public class student {
    //id 姓名 年龄
    private int id;
    private String name;
    private int age;
    public student(int id,String name,int age){
        this.id=id;
        this.name=name;
        this.age=age;
    }
    public void setId(int id){
        if(id>0){
            this.id=id;
        }else{
            System.out.println("输入错误");
        }
    }
    public int getId(){
        return id;
    }

    public void setName(String name){
        this.name=name;
    }
    public String getName(){
        return name;
    }

    public void setAge(int age){
        if(age>0){
            this.age=age;
        }else{
            System.out.println("输入错误");
        }
    }
    public int getAge(){
        return age;
    }
}
